import type { FormSchema } from '@/components/core/schema-form/';

export const schemas: FormSchema[] = [
  {
    field: 'illegalAct',
    component: 'InputTextArea',
    label: '①',
    rules: [{ required: true, message: '请输入证据' }],
    componentProps: () => {
      return {
        placeholder: '请输入证据',
      };
    },
  },
  {
    field: 'regulation',
    component: 'Select',
    label: '②',
    rules: [{ required: true, type: 'number', message: '请选择方式' }],
    componentProps: () => {
      return {
        placeholder: '请选择方式',
        options: [
          {
            label: '违法行为轻微并及时改正，没有造成危害后果',
            value: 0,
            key: '0',
          },
          {
            label: '有证据足以证明没有主管过错',
            value: 1,
            key: '1',
          },
        ],
      };
    },
  },
  {
    field: 'penalty',
    component: 'InputTextArea',
    label: '③',
    rules: [{ required: true, message: '请输入证据' }],
    componentProps: () => {
      return {
        placeholder: '请输入证据',
      };
    },
  },
  {
    field: 'executeWay',
    component: 'Select',
    label: '④',
    rules: [{ required: true, type: 'number', message: '请选择方式' }],
    componentProps: ({ formInstance }) => {
      return {
        placeholder: '请选择方式',
        options: [
          {
            label: '当场改正完毕',
            value: 0,
            key: '0',
          },
          {
            label: '当日改正完毕',
            value: 1,
            key: '1',
          },
          {
            label: '将危害部位停用',
            value: 2,
            key: '2',
          },
        ],
      };
    },
  },
  {
    field: 'info1',
    component: 'InputTextArea',
    label: '⑤',
    componentProps: () => {
      return {
        placeholder: '请输入指导意见',
      };
    },
  },
  {
    field: 'info2',
    component: 'InputTextArea',
    label: '',
    componentProps: () => {
      return {
        placeholder: '请输入指导意见',
      };
    },
  },
  {
    field: 'info3',
    component: 'InputTextArea',
    label: '',
    componentProps: () => {
      return {
        placeholder: '请输入指导意见',
      };
    },
  },
];
